import request from '@/utils/request'

// 查询可拼团商品
export function findGoodList() {
  return request({
    url: '/consumer/consumer/findGroupGood',
    method: 'post'
  })
}

// 查找可拼团商品的sku登
export function findGoodSkuList(data) {
  return request({
    url: '/consumer/consumer/findGroupGoodSku/' + data,
    method: 'post'
  })
}

// 查找可拼团商品的sku登
export function joinGroup(data) {
  return request({
    url: '/consumer/consumer/joinGroup',
    method: 'post',
    data
  })
}

// 查找当前用户
export function findUser() {
  return request({
    url: '/consumer/consumer/findUser',
    method: 'post'
  })
}

// 支付
export function toPay(data) {
  return request({
    url: '/consumer/alipay/toPayByAliBaba',
    method: 'post',
    data
  })
}

// 查找参与记录
export function findGroupRecordList(data) {
  return request({
    url: '/consumer/consumer/findGroupRecordList/' + data,
    method: 'post'
  })
}

// 跳转路径
export function goUrl() {
  return request({
    url: '/consumer/consumer/goUrl',
    method: 'post'
  })
}

// 是否参加过
export function findIsJoinGroup(data) {
  return request({
    url: '/consumer/consumer/findIsJoinGroup/' + data,
    method: 'post'
  })
}

// 分享链接
export function shareUrl(data) {
  return request({
    url: '/consumer/consumer/shareUrl',
    method: 'post',
    data
  })
}

// 查找链接的拼团商品
export function findGroupGoodByUrl(data) {
  return request({
    url: '/consumer/consumer/findGroupGoodByUrl',
    method: 'post',
    data
  })
}
